package edu.calpoly.android.echoes;



public class Speed {
	public static final int X_RIGHT = 1;
	public static final int X_LEFT = -1;
	public static final int Y_DOWN = 1;
	public static final int Y_UP = -1;
	
	private int _x = 1, _y = 1;
	
	private int _xDir = X_RIGHT;
	private int _yDir = Y_DOWN;
	
	public int getXDirection() {
		return _xDir;
	}
	
	public void setXDirection(int direction) {
		_xDir = direction;
	}
	
	public void toggleXDirection() {
		_xDir *= -1;
	}
	
	public int getYDirection() {
		return _yDir;
	}
	
	public void setYDirection(int direction) {
		_yDir = direction;
	}
	
	public void toggleYDirection() {
		_yDir *= -1;
	}
	
	public int getX() {
		return _x;
	}
	
	public void setX(int speed) {
		_x = speed;
	}
	
	public int getY() {
		return _y;
	}
	
	public void setY(int speed) {
		_y = speed;
	}
	
	public String toString() {
		String xDirection;
		if (_xDir == X_RIGHT) {
			xDirection = "right";
		} else {
			xDirection = "left";
		}
		return "Speed: x: " + _x + " | y: " + _y + " | xDirection: " + xDirection;
	}
}
